package com.shjy.driver.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.shjy.driver.xf.XFUtil;

import java.util.TimerTask;

/**
 * Created by zmy on 2018/3/29.
 */

public class SpeakTask extends TimerTask {
    private Context context;
    private String message;
    public SpeakTask(Context context,String message){
        this.context = context;
        this.message = message;
    }
    @Override
    public void run(){
        /**
         *要执行的操作
         */
        // 讯飞语音播报
        if (!TextUtils.isEmpty(message)) {
            XFUtil.speak(context, message);
        }
    }
}